﻿@page "/floatinglabels"
@inject IStringLocalizer<Inputs> Localizer
@inject IStringLocalizer<FloatingLabels> FLocalizer

<h3>@FLocalizer["Title"]</h3>

<h4>@FLocalizer["H1"]</h4>

<Block Title="@FLocalizer["Block1Title"]" Introduction="@FLocalizer["Block1Intro"]">
	<FloatingLabel LabelText="Text" TValue="string" />
</Block>

<Block Title="@FLocalizer["Block2Title"]" Introduction="@FLocalizer["Block2Intro"]">
	<FloatingLabel LabelText="Text" Value="@Model.Name" />
</Block>

<Block Title="@FLocalizer["Block3Title"]" Introduction="@FLocalizer["Block3Intro"]">
	<ValidateForm Model="@Model">
		<FloatingLabel LabelText="@FLocalizer["LabelText1"]" maxlength="5" @bind-Value="@Model.Name" />
	</ValidateForm>
</Block>

<Block Title="@FLocalizer["Block4Title"]" Introduction="@FLocalizer["Block4Intro"]">
	<p>@((MarkupString)FLocalizer["P1"].Value)</p>
	<FloatingLabel LabelText="@FLocalizer["LabelText2"]" TValue="string" type="password" maxlength="5" style="width: 200px;" />
</Block>

<Block Title="@FLocalizer["Block5Title"]" Introduction="@FLocalizer["Block5Intro"]">
	<div class="row g-3">
		<div class="col-12 col-sm-6">
			<FloatingLabel LabelText="@FLocalizer["LabelText3"]" FormatString="000" step="1" @bind-Value="@Model.Count" />
		</div>
		<div class="col-12 col-sm-6 align-self-center">
			<div class="col-form-label">@FLocalizer["Div1", @Model.Count.ToString("000")]</div>
		</div>
	</div>
</Block>

<Block Title="@FLocalizer["Block6Title"]" Introduction="@FLocalizer["Block6Intro"]">
	<FloatingLabel LabelText="@FLocalizer["LabelText4"]" TValue="string" IsDisabled="true" />
</Block>

<Block Title="@FLocalizer["Block7Title"]" Introduction="@FLocalizer["Block7Title"]">
	<div class="row g-3">
		<div class="col-12 col-sm-6 col-form-label align-self-center">@FLocalizer["Div2"] <code class="ms-1">FormatString</code></div>
		<div class="col-12 col-sm-6">
			<FloatingLabel LabelText="FormatString" Value="DateTime.Now" FormatString="yyyy-MM-dd" IsDisabled="true" />
		</div>
		<div class="col-12 col-sm-6 col-form-label align-self-center">@FLocalizer["Div2"] <code class="ms-1">Formatter</code></div>
		<div class="col-12 col-sm-6">
			<FloatingLabel LabelText="Formatter" Value="DateTime.Now" Formatter="@DateTimeFormatter" IsDisabled="true" />
		</div>
	</div>
	<p class="mt-3">@((MarkupString)FLocalizer["P2"].Value)</p>
	<div class="row g-3">
		<div class="col-12 col-sm-6 col-form-label align-self-center">@FLocalizer["Div2"] <code class="ms-1">Formatter</code></div>
		<div class="col-12 col-sm-6">
			<FloatingLabel LabelText="@FLocalizer["LabelText5"]" Value="@ByteArray" Formatter="@ByteArrayFormatter" IsDisabled="true" />
		</div>
	</div>
</Block>

<Block Title="@FLocalizer["Block8Title"]" Introduction="@FLocalizer["Block8Intro"]">
	<div class="row g-3">
		<div class="col-auto col-form-label align-self-center">
			<span>@FLocalizer["Span"]</span>
		</div>
		<div class="col-6">
			<FloatingLabel LabelText="@FLocalizer["LabelText6"]" type="password" TValue="string" />
		</div>
	</div>
</Block>

<AttributeTable Items="@GetAttributes()" />
